<!DOCTYPE html PUBLIC 
	"-//W3C//DTD XHTML 1.1 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	
<%@taglib prefix="s" uri="/struts-tags" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title><s:text name="book.details" /></title>	
	<s:head />
</head>
<body>
	<s:if test="#session['user'] == null">
		<s:form namespace="/resource">
			<s:label key="book.title" name="title"/>
			<s:label key="book.author" name="author"/>
			<s:label key="book.place" name="place"/>
			<s:label key="book.publisher" name="publisher"/>
			<s:label key="book.summary" name="summary"/>
			<s:label key="book.subjects" name="subjects"/>
			<s:label key="book.ISBN" name="ISBN"/>
			<s:label key="book.collaborator" name="collaborator"/>
			<s:hidden name="resourceId" />
		</s:form>
	</s:if>
	<s:else>
		<s:if test="#session['user'].type.equals('ADMIN')">
			<s:form action="updateBook" namespace="/resource">
				<s:textfield key="book.title" name="title"/>
				<s:textfield key="book.author" name="author"/>
				<s:textfield key="book.place" name="place"/>
				<s:textfield key="book.publisher" name="publisher"/>
				<s:textfield key="book.summary" name="summary"/>
				<s:textfield key="book.subjects" name="subjects"/>
				<s:textfield key="book.ISBN" name="ISBN"/>
				<s:textfield key="book.collaborator" name="collaborator"/>
				<s:hidden name="resourceId" />
				<s:submit key="book.create"/>
			</s:form>
		</s:if>
	</s:else>
	<s:else>
		<s:form action="reserveBook" namespace="/resource">
			<s:label key="book.title" name="title"/>
			<s:label key="book.author" name="author"/>
			<s:label key="book.place" name="place"/>
			<s:label key="book.publisher" name="publisher"/>
			<s:label key="book.summary" name="summary"/>
			<s:label key="book.subjects" name="subjects"/>
			<s:label key="book.ISBN" name="ISBN"/>
			<s:label key="book.collaborator" name="collaborator"/>
			<s:hidden name="resourceId" />
			<s:submit key="book.reserve"/>
		</s:form>
	</s:else>
</body>
</html>